package org.zyj.io.example.case9;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.nio.charset.StandardCharsets;

@Data
@AllArgsConstructor
@NoArgsConstructor
class CustomProtocol {
    int length;
    byte[] content;

    public String toString() {
        return "CustomProtocol(length=25, content=" + new String(content, StandardCharsets.UTF_8) + ")";
    }
}
